// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	8/4/2013 1:25:25 PM				
// -----------------------------

#ifndef _LuaStackGuard_h
#define _LuaStackGuard_h

#include "LuaObject.h"

namespace ObjectLua
{

	/*
	//	Lua Stack Guard object used
	//	to make sure that the stack stays
	//	intact after creation
	//	Uses RAII
	*/
	class OBJECTLUA LuaStackGuard : public LuaObject
	{
	public:
		LuaStackGuard(Lua* lpLua, int stackDepth = 0);
		virtual ~LuaStackGuard();
	
	private:
		
		int		m_iStackDepth;

		LuaStackGuard(const LuaStackGuard& refLuaStackGuard);
		LuaStackGuard& operator=(const LuaStackGuard& refLuaStackGuard);
	};

}

#endif